<template>
    <div>
      <svg-icon icon-class="music" @click="goto" />
    </div>
  </template>
  
  <script>
  export default {
    name: 'LingMusic',
    data() {
          // 动态获取当前应用运行的端口号
          const port = window.location.port;
        // 拼接完整的 URL
        const protocol = window.location.protocol; // 获取当前协议，如 http:
        const baseUrl = `${protocol}//localhost:${port}/music/music`;
      return {
        url: baseUrl
      }
    },
    methods: {
      goto() {
        window.open(this.url)
      }
    }
  }
  </script>